﻿using System.Collections.Generic;

namespace JuCheap.Core.Model.Permission
{
    /// <summary>
    /// 用户角色权限返回模型
    /// </summary>
    public class UserRolePermissionResponse
    {
        public UserRolePermissionResponse() {

            Actions = new List<UserRoleActionResponse>();
            ActionEntitySet = new List<UserRoleActionResponse>();
        }

        public UserRolePermissionResponse(string roleId, string permissionId, string permissionName) : base()
        {
            RoleId = roleId;
            PermissionId = permissionId;
            PermissionName = permissionName;
        }

        /// <summary>
        /// 角色Id
        /// </summary>
        public string RoleId { get; set; }
        /// <summary>
        /// 权限Id
        /// </summary>
        public string PermissionId { get; set; }
        /// <summary>
        /// 权限名称
        /// </summary>
        public string PermissionName { get; set; }
        /// <summary>
        /// 权限操作集合
        /// </summary>
        public List<UserRoleActionResponse> Actions { get; set; }
        /// <summary>
        /// 实体操作权限
        /// </summary>
        public List<UserRoleActionResponse> ActionEntitySet { get; set; }
    }

    /// <summary>
    /// 权限操作模型
    /// </summary>
    public class UserRoleActionResponse
    {
        /// <summary>
        /// 操作标识
        /// </summary>
        public string Action { get; set; }

        /// <summary>
        /// 默认选中
        /// </summary>
        public bool DefaultCheck { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string Describe { get; set; }
    }
}
